import type { DataTableColumns } from 'naive-ui'

const codeStore = useCodeStore()

export const basicColumns: DataTableColumns<SystemLogPO> = [
  {
    key: 'id',
    title: '主键'
  },
  {
    key: 'bizId',
    title: '业务主键'
  },
  {
    key: 'bizName',
    title: '业务名称'
  },
  {
    key: 'type',
    title: '类型',
    render(row) {
      return codeStore.getName(_Dict.LogType, row.type)
    }
  },
  {
    key: 'tableName',
    title: '表名'
  },
  {
    key: 'creator',
    title: '创建人'
  },
  {
    key: 'gmtCreate',
    title: '创建时间',
    render(row) {
      return formatDate(row.createTime)
    }
  }
]
